package org.ykh.gmall.list;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.test.autoconfigure.data.elasticsearch.DataElasticsearchTest;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Import;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
import org.ykh.gmall.list.service.SearchService;
import org.ykh.gmall.list.service.impl.SearchServiceImpl;

/**
 * @author ykh
 */
@DataElasticsearchTest
@ImportAutoConfiguration({RedisAutoConfiguration.class})
@Import({SearchServiceImpl.class})
public class ServiceListTestService {

    @Test
    void environmentTest(@Autowired ApplicationContext applicationContext) {
        for (String beanDefinitionName : applicationContext.getBeanDefinitionNames()) {
            System.out.println(beanDefinitionName);
        }
    }
}
